<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>扫码入库</title>
    <link rel="stylesheet" href="/sb/stock.css"/>
    <style type="text/css">
        .record-box {
            position: relative;
            width: 500px;
            padding: 0 5px 20px;
            font-size: 13px;
            color: #787878;
        }

        .record-box h2 {
            font-weight: bold;
            font-size: 18px;
            margin-bottom: 40px;
        }

        .record-input, .record-tips {
            width: 320px;
            margin: 0 auto;
            text-align: left;
        }

        .record-input input[type=text] {
            width: 400px;
            height: 22px;
            line-height: 22px;
            font-size: 16px;
            padding: 14px 9px;
            border: 1px solid #787878;
        }

        .record-tips {
            padding: 5px 0;
            color: #f00;
            font-size: 13px;
            line-height: 2;
        }
    </style>
    <script src="/js/jquery-3.3.1.min.js"></script>
    <script>
        $(function () {
            $("#billNo").focus();
            $("form").submit(function () {
                var billNo = $("#billNo").val();
                if (billNo == '') {
                    $("#record-tips").html("请输入采购单编码");
                    return false;
                } else {
                    //AJAX查询是否存在
                }
            })
        })
    </script>
</head>
<body>
<div class="record-box">
    <h2>请扫描采购单条形码</h2>
    <form action="/stock_in/purchase_detail" method="get" target="_blank">
        <div class="record-input">
            <input type="text" id="billNo" name="billNo" autocomplete="off"/>
            <input type="submit" value="查询"/>
        </div>
        <div class="record-tips" id="record-tips"></div>
    </form>
</div>
</body>
</html>